import {useLocation} from "react-router-dom";
import RootRoute from './router'
import './App.css'
import Bar from '@/components/bar';

function App() {

  const location = useLocation();
  const barRander = (pathname:string)=>{
    let arr = ['/login','/back']
    if(!arr.includes(pathname)){
      return <Bar />
    }
  }
  
  return (
    <div className="App bg-home">
      <RootRoute></RootRoute>
      {barRander(location.pathname)}
    </div>
  )
}

export default App
